home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_068 / mg1b / sys / amiga / amiga.doc < prev    next >
Text File  |  1992-05-06  |  19KB  |  443 lines

  1.  
  2.                         Amiga MicroGNUEmacs Notes
  3.                         ------------------------
  4.  
  5.    This file purports to document the Amiga-specific features of
  6. MicroGNUEmacs. Except where otherwise noted, "MicroEmacs", "Emacs",
  7. "MG", and "MicroGNUEmacs" all refer to the Amiga version of the
  8. GNU-compatible MicroEmacs text editor. MicroEmacs was created by Dave
  9. Conroy. This version has been GNUified by Mike Meyer, and the
  10. Intuition terminal driver enhanced and (hopefully) improved by Mic
  11. Kaczmarczik.
  12.  
  13.    It is assumed that you already know about the point and the mark,
  14. buffers, windows, extended commands, and the various areas on the
  15. screen that all versions of MicroEmacs maintain. If you don't, see the
  16. MicroEmacs documentation (what there is of it) for more information.
  17.  
  18.                               OPTIONS
  19.                               -------
  20.  
  21.    (This section is for people who have their own C compiler. If you
  22. don't have a C compiler, you will hopefully have a version that has
  23. *everything* compiled into it...)
  24.  
  25.    There are a bewildering variety of extra goodies available as
  26. compile-time options when you construct an Amiga MicroEmacs. If you
  27. select none of them, you save on disk space, but lose out on some
  28. features and versatility.
  29.  
  30.    The Makefile provides documentation on these options and what to do
  31. to make them work, but here is a quick overview:
  32.  
  33.    STARTUP -- You can configure MicroEmacs so that it will look for a
  34. startup file in either the current directory or the AmigaDOS s:
  35. (startup) directory. An example startup file is included in the
  36. distribution, and also see the STARTUP section below.
  37.  
  38.    MENU -- If this option is used, MicroEmacs puts an Intuition menu
  39. bar with major editing commands at the top of the screen, just like a
  40. "real" Amiga program. (See the section on the MENU for more info).
  41.  
  42.    BROWSER -- This has got to be seen to be appreciated. The Browser
  43. program turns the menu bar into a way to select files on a disk. First
  44. you select a disk, then a directory on the disk, then a file or
  45. subdirectory on the disk, and so on, all in the menu.
  46.  
  47.    MOUSE -- This option turns on the Amiga Hot Mouse (and it's all due
  48. to Mike Meyer!). You can click on a character and move point to that
  49. spot, and that's just the beginning. (See the MOUSE section for more.)
  50.  
  51.    XKEYS -- This option turns on support for all the extra Amiga
  52. function keys. This enables the HELP key, which runs the function
  53. "describe-key-briefly". Arrow keys work -- shift-arrow keys apply to
  54. words and paragraphs. (See the KEYBOARD section.)
  55.  
  56.    BACKUP -- When chosen, this function modifies the action of the
  57. save-buffer (C-x C-s) command.  Normally, save-buffer writes out a new
  58. copy of the buffer to disk, thus destroying the contents of the
  59. original file.  If BACKUP is enabled, you can tell MG to rename the
  60. file to filename~ (with a tilde character at the end), before the new
  61. copy is written out.  This keeps the next-to-last copy of your file
  62. around on disk, so you can recover from bad mistakes.  However, to
  63. avoid filling up disk space too quickly, by default MG does *NOT* make
  64. backup files; to do so, enter the command "M-x make-backup-files",
  65. which enables making backup files the next time you enter C-x C-s to
  66. save a file.  If you give an argument to the function (by typing "C-u
  67. M-x make-backup-files", for example), backup files are not made. 
  68.  
  69.    DO_METAKEY -- Characters with the high bit set (i.e. codes > 0x80)
  70. are transformed into 'META' characters. If you're using 1.2, you will
  71. need to issue the command setmap usa0 to get the same console keymap
  72. as the one used by 1.1. If you don't have the usa0 keymap, this option
  73. may or may not be too helpful. If you *do* have DO_METAKEY set, you
  74. can still use the CTRL-Q command to insert ALT-ed characters.
  75.  
  76.    CHANGE_FONT -- This allows you to set the font used by the Amiga
  77. console device driver when it draws characters in the Emacs window.
  78. For instance, this lets you use a slightly taller font for editing
  79. when using interlace mode under 1.2.  MG cannot handle proportionally
  80. spaced fonts, but will allow you to use them (with rather confusing
  81. results) if you really want to.
  82.  
  83.    MODE_RENDITION, {TEXT,MODE}_{FG,BG} -- These are #defines that
  84. determine the default rendition of the mode line and the foreground
  85. and background colors of the text. See the COLOR section for more
  86. info.
  87.  
  88.    CHANGE_COLOR -- If you want to be able to mess around with the
  89. foreground and background colors of the text window, this option
  90. allows you to do that. You can also specify the way the status line is
  91. rendered (plain, boldface, italics, or reverse video).
  92.  
  93.                               THE MOUSE
  94.                               ---------
  95.  
  96. (This section originated from Mike Meyer, the inventor of the Hot
  97. Mouse. It has been edited to be consistent with the current state of
  98. the Hot Mouse.)
  99.  
  100.    The Amiga Mouse in hot mode can invoke no less than 24 different
  101. functions!!!  They are treated as keys by the rest of MicroEmacs, even
  102. though you click the mouse and hold down qualifier keys to get them.
  103.  
  104.    Mouse keys come in three groups of eight, the groups being Mouse
  105. keys, Mode-Mouse keys, and Echo-Mouse keys. Inside each group, which
  106. of the eight keys you get is determined by the combination of Shift,
  107. CTRL and ALT keys you are holding down when the mouse button is
  108. pressed. So yes, there really is a C-M-Shift-Mode-Mouse button*.
  109. Note that the Meta (M-) prefix *MUST* be the ALT key. Prefixing it
  110. with ESC will *not* work.  Sorry, life's a beach.
  111.  
  112. [* Technical note *]
  113.  
  114.    Sadly, in order to keep the basic MicroEmacs editor code the same
  115. for all systems (it runs on everything from DEC-20's to CP/M
  116. machines), the Mouse keys do not have names like C-M-Shift-Mode-Mouse.
  117. They end up having names like ESC C-a when you use the
  118. describe-key-briefly command. This may be changed in a later version.
  119.  
  120. [* Practical note *]
  121.    Because of the above restriction (I'm working on it, I'm working on
  122. it!) you sometimes get burned when you absent-mindedly click the mouse
  123. during a dialogue (e.g. I-search or switch-buffer). I have not found a
  124. good way to avoid this problem and preserve the main editor, so I'm
  125. leaving this unresolved until the next round of improvements.
  126.  
  127.    Mouse keys are generally bound to functions that affect the text in
  128. the selected buffer. If the Intuition mouse pointer is located inside
  129. an Emacs text window (i.e. an area where text is being edited), then a
  130. Mouse key is sent to the editor when you click the mouse. The buffer
  131. associated wth the window the pointer is in is made current, the point
  132. is set as close as possible to the pointer (the character under the
  133. pointer, if possible), then the command bound to that mouse button is
  134. executed.
  135.  
  136.    If the mouse pointer is in the mode line - the line that is in a
  137. different typeface (usually backlit, maybe black instead of white) --
  138. when the mouse button is clicked, a Mode-Mouse key is sent to the
  139. editor. The buffer that the selected status line is associated with is
  140. made the current buffer, the point is set to the value of point for
  141. that window, then whatever command is bound to that button is
  142. executed. Most of the Mode-Mouse keys invoke functions that act on the
  143. entire window or buffer.
  144.  
  145.    Clicking the mouse button when the mouse pointer is in the echo
  146. line - the line at the bottom of the screen where prompts and message
  147. appear - results in an Echo-Mouse key. Whatever command is bound to
  148. that button will be executed.  Since the echo line is not part of
  149. a buffer or a window, all the functions bound to Echo-Mouse keys
  150. affect the state of the editor as a whole.
  151.    
  152.    The default bindings for the hot mouse (as distributed) are:
  153.  
  154.  Qualifiers  |            Area clicked
  155.              |
  156. C  A  Shift  |    Text window        Mode line    Echo line
  157. -------------+---------------------------------------------------------
  158.          |    dot to mouse        forward page    switch to other buffer 
  159.       X         |    recenter        backward page    kill buffer
  160.    X         |    delete word        split window    describe key
  161.    X  X         |    kill line        delete window    describe bindings
  162. X         |    delete char        goto bob    suspend emacs
  163. X     X         |    delete whitespace    goto eob    quit
  164. X  X         |    kill region        enlarge window    list buffers
  165. X  X  X         |    yank            shrink window    toggle Intuition window
  166.  
  167.    To help keep straight what the various keys do, notice that the
  168. Status and Echo groups come in pairs; the shifted version of a key is
  169. in some sense the opposite of the unshifted version. There is no
  170. opposite for display buffers, so that key is bound to
  171. toggle-window-hack, which toggles Emacs' Intuition window between
  172. bordered and borderless.
  173.  
  174.    Like any Emacs key, you are perfectly free to rebind the 24 mouse
  175. buttons to do whatever you wish, although currently you can't rebind
  176. them in a startup file.
  177.  
  178.                THE KEYBOARD
  179.                ------------
  180.  
  181.    There is a shortcut for many of the Meta commands (usually
  182. indicated by the ESC character): hold down the ALT key at the same
  183. time you type what usually comes after the ESC.
  184.  
  185.    (Historically, this is why keys that are typed with ESC in front of
  186. them are called META keys; on the terminals at MIT where Emacs was
  187. originally written, there was a META key on the keyboard that did what
  188. the ALT key does. However, not many terminals outside of MIT have the
  189. META key at all, so the ESC key was nominated as a way to tell the
  190. system that the next character should be converted into a META key
  191. before it is interpreted.)
  192.  
  193.    If you are running under the 1.2 Workbench, you may need to issue
  194. the command "setmap usa0" to make things work right (the default
  195. console keymap changed between 1.1 and 1.2).
  196.  
  197.    MicroEmacs also recognizes all the standard Amiga function keys.
  198. For quick help on a key, type the HELP key and then the key you want
  199. help on. The following commands are bound to the Amiga function keys:
  200.  
  201.     Key            Function
  202.     --------------------------------------------
  203.     Help            describe-key-briefly
  204.  
  205.     Left            backward-char
  206.     Shift-Left        backward-word
  207.     Right            forward-char
  208.     Shift-Right        forward-word
  209.  
  210.     Up            previous-line
  211.     Shift-Up        backward-paragraph
  212.  
  213.     Down            next-line
  214.     Shift-Down        forward-paragraph
  215.  
  216.     F1            find-file
  217.     Shift-F1        find-file-other-window
  218.     F2            save-buffer
  219.     Shift-F2        write-file
  220.     F3            scroll-up (page down)
  221.     Shift-F3        scroll-down (page up)
  222.     F4            next-window
  223.     Shift-F4        previous-window
  224.     F5            enlarge-window
  225.     Shift-F5        shrink-window
  226.     F6            fill-paragraph
  227.     Shift-F6        query-replace
  228.     F7            split-window-vertically
  229.     Shift-F7        delete-other-windows
  230.     F8            global-set-key
  231.     Shift-F8        global-unset-key
  232.     F9            start-kbd-macro
  233.     Shift-F9        end-kbd-macro
  234.     F10            call-last-kbd-macro
  235.     Shift-F10        save-buffers-kill-emacs
  236.  
  237.  
  238.               FUNCTION KEY NAMES
  239.               ------------------
  240.  
  241. On the Amiga, all the function keys are readily visible on the
  242. keyboard, so this table of key names for use in strings is fairly
  243. self-explanitory.  If you want to rebind Shift-Down-Arrow to scroll-up
  244. (move down a whole page), for example, insert the line
  245.  
  246.     global-set-key "\f24" scroll-up
  247.  
  248. in your s:.mg file.
  249.  
  250.     Function Key    Startup file    | Shifted Key        Startup file
  251. -----------------------------------------------------------------------------
  252.     F1        f1        | Shift-F1        f11
  253.     F2        f2        | Shift-F2        f12
  254.     F3        f3        | Shift-F3        f13
  255.     F4        f4        | Shift-F4        f14
  256.     F5        f5        | Shift-F5        f15
  257.     F6        f6        | Shift-F6        f16
  258.     F7        f7        | Shift-F7        f17
  259.     F8        f8        | Shift-F8        f18
  260.     F9        f9        | Shift-F9        f19
  261.     F10        f10        | Shift-F10        f20
  262.                     |
  263.     Up        f21        | Shift-Up        f22
  264.     Down        f23        | Shift-Down        f24
  265.     Left        f25        | Shift-Left        f26
  266.     Right        f27        | Shift-Right        f28
  267.                     |
  268.     Help        f29        |
  269.  
  270.  
  271.                  THE MENU
  272.                  --------
  273.    If the menu option is compiled into the program, you can also use
  274. the Intuition menu, just like a "real" Amiga program. The menu names
  275. are relatively self-explanitory, as are the names inside each menu. If
  276. you want to learn what the command key is for a menu function, type
  277. "<ESC>-x describe-bindings<RET>" and page through till you find a
  278. function with a similar name. A future release of the Amiga driver
  279. will probably allow you to directly find out what command keys are
  280. bound to a particular function, but you'll just have to bear with us
  281. for a while.
  282.  
  283.                 THE BROWSER
  284.                 -----------
  285.  
  286.    The Browser is the next best (or even better, for some purposes)
  287. thing to a file requester. In essence, it puts the directory tree up
  288. in the menu bar, where you can visit files simply by selecting their
  289. names from the menu bar. Try it, you'll like it.  If the MENU option
  290. is also compiled in, the editing menus are all submenus of the first,
  291. "Edit" menu, and the Browser uses the rest of the menu bar.
  292.  
  293.                WINDOW OPTIONS 
  294.                --------------
  295.  
  296.    As a service to those of us who want a full-size, 80-column editing
  297. window, Amiga MicroEmacs allows you to make its window borderless. If
  298. you like, you can take over the full Workbench screen (48 rows, 80
  299. columns in interlace mode under 1.2). Borderless windows can be
  300. "visually confusing", to say the least, so it's probably best to
  301. either to 1) take over the whole screen or 2) put the Emacs window at
  302. the bottom of the screen.
  303.  
  304.    When Amiga MicroEmacs starts up, its initial window is borderless,
  305. and 640x200 pixels in dimension. To change to a resizeable window,
  306. issue the command "M-x toggle-window-hack" or select the "Toggle
  307. Window" item from the menu (if it is compiled into the program).
  308. MicroEmacs will create a new, resizeable, bordered window, which you
  309. can then set to whatever size you wish using the sizing gadget in the
  310. bottom left corner of the window.
  311.  
  312.    To go back to a borderless window, issue the "Toggle Window"
  313. command again. MicroEmacs will remember the current size of the
  314. resizeable window, and create a borderless window with the same
  315. dimensions and position. Since under Workbench 1.2 you can use a
  316. 640x400 window, this lets you take up the *entire screen* -- 48 rows
  317. by 80 columns!
  318.  
  319.  
  320.                CHANGING THE WINDOW'S FONT
  321.                --------------------------
  322.  
  323.    There may be times when you'd like to use another font on the screen,
  324. either to make the text easier to read, or for some special effect, like
  325. editing something on a TV projection system.  MG lets you change the
  326. font that is used to draw characters in the window, using the command
  327. M-x set-font.
  328.  
  329.    You can use the universal argument to set the desired text font size,
  330. for example saying C-u 12 M-x set-font, then typing "opal" when it
  331. prompts you for the name of the font.  If you give an argument that is
  332. <= 0, MG resets the window's font to the system default (set by
  333. Preferences).  If you don't give an argument, MG prompts you for the
  334. desired font size.
  335.  
  336.    Changing the window's font to one that is designed to be
  337. proportionally spaced does not work very well, because Emacs expects the
  338. all characters on the screen to be the same width, which is of course
  339. not the case with proportional fonts.  MG lets you use proportional
  340. fonts, but it asks you to make sure first. 
  341.  
  342.  
  343.                 TEXT RENDITION
  344.                 --------------
  345.  
  346.    If you really want to, you can change the "soft style" the console
  347. device uses to draw characters in the text area and the mode line.
  348. The possible values for these styles are:
  349.  
  350.     0    plain
  351.     1    boldface
  352.     3    italic
  353.     4    underline
  354.     7    inverse
  355.  
  356.    About the only useful values are the ones for plain, boldface or
  357. italics. The default value for text is 0 (plain, of course), while the
  358. default for the mode line is 7 (inverse video). These can be changed
  359. by the appropriate #definitions of MODE_RENDITION and TEXT_RENDITION.
  360.  
  361.    The commands to change the rendition values are:
  362.  
  363.     set-text-rendition
  364.         Set text area rendition
  365.     set-mode-rendition
  366.         Set mode line rendition (this is by far the more useful)
  367.  
  368.                 COLOR
  369.                 -----
  370.  
  371.    You can set the colors the console device uses to draw the text you
  372. are editing. (This does not mean that you can specify *any* color;
  373. your choices are limited to the colors being used by Intuition to
  374. maintain the Workbench screen.) The commands that control this
  375. behavior are:
  376.  
  377.     set-text-foreground
  378.         Sets the color used to draw the characters you
  379.         see in the text area (distinct from the mode
  380.         line area for each window).  Accepts a number from
  381.         0 to 7.  The value initially used is 1.  You can
  382.         get a reverse video screen by selecting 0 for this
  383.         value and 1 for the background color
  384.  
  385.     set-text-background
  386.         Sets the color used the draw the background behind
  387.         characters in the text area.  Accepts the same values
  388.         as set-text-foreground-color.  The initial value
  389.         is 0.
  390.  
  391.     set-mode-foreground
  392.         Sets the foreground color used by the mode line.  If you
  393.         set this to 0 and the background color to 1, you can get
  394.         a reverse video mode line even when you select italics for
  395.         the mode line rendition (see RENDITION)
  396.  
  397.     set-mode-background
  398.         Sets the background color for the mode line.  You should
  399.         get the idea by now.
  400.         
  401.  
  402.                 FUNCTION LIST
  403.                 -------------
  404.  
  405.    For completeness, here is a list of all Amiga MicroEmacs functions
  406. that are specific to the Amiga. See the file "functions" for the others.
  407.  
  408. amiga-menu
  409.     The entry point for using Emacs's Intuition menu.  This function
  410.     figures out which menu selection was used, then calls the
  411.     appropriate function by name (not hard-coded key value)
  412. amiga-mouse
  413.     Set dot to where the mouse is pointing.  Two clicks in the same
  414.     spot set the mark too.
  415. mouse-*
  416.     Functions that first either 1) move point to where the mouse
  417.     points to or 2) select the buffer associated with the mode line
  418.     the mouse clicked in, then call the function indicated by the
  419.     rest of the name.  These functions are all "bound" to mouse
  420.     clicks, because the input machinery converts them into internal
  421.     Emacs "keys".
  422. set-font
  423.     Set the font used to draw characters inside the Emacs window.
  424.     A positive argument is used for the size of the font, while
  425.     a nonpositive argument requests that the font be set to the
  426.     system default font.  Menu items are not affected by this command.
  427. set-mode-rendition
  428. set-text-rendition
  429.     Set the way your text (or the mode line) is rendered.  Choose
  430.     from 0 (plain), 1 (bold), 3 (italic), 4 (underline), or
  431.     7 (reverse video). 0, 1, and 3 are about the only really useful
  432.     ones for text; 7 is the default for the mode line.
  433. set-text-foreground
  434. set-text-background
  435. set-mode-foreground
  436. set-mode-background
  437.     Set the system color used to draw the characters in the text area
  438.     and mode line.  Accepts a value between 0 and 7; the default for
  439.     the background is 0, the default for the text is 1.
  440. toggle-window-hack
  441.     Switch your window between resizable and borderless. Lets you
  442.     take over the whole screen (80 columns! 48 lines in interlace!)
  443.